<?php 

  $data = $_POST;
  if(!empty($data['username'])&&!empty($data['content'])){
  $data['create_time'] = time();
  $db = include "./db.php";
  array_push($db, $data);
  $str = var_export($db,true);
  $str = "<?php return ".$str."?>";
  file_put_contents('./db.php', $str);
  header('location:./index.php');
  }else{
  	header("Refresh:2,Url='./index.php'");
  	header("Content-type:text/html;charset=utf-8");
     echo '2s 后跳转,数据不能为空';
  }
  



















 ?>